Skip to content

Comments

feat: Add Storybook 9 and 10 compatibility#509

Merged
ygkn merged 2 commits intomainfrom
storybook10
Nov 1, 2025
Merged

feat: Add Storybook 9 and 10 compatibility#509
ygkn merged 2 commits intomainfrom
storybook10

Conversation

@ygkn
Copy link
Owner

@ygkn ygkn commented Nov 1, 2025

Summary

  • Update TypeScript configuration to support Storybook 10's ESM-only package structure
  • Update devDependency to Storybook 10.0.2

Changes

TypeScript Configuration (tsconfig.json)

  • Changed module from "commonjs" to "ESNext"
  • Added moduleResolution: "bundler"

These changes allow TypeScript to properly resolve Storybook 10's ESM-only internal API types (storybook/internal/*). The actual build output remains CommonJS format via esbuild, so there's no runtime behavior change.

Dependencies

  • Updated storybook from 9.1.16 to 10.0.2 in devDependencies

Verification

  • ✅ Build output is identical (verified via SHA-256 hash)
  • ✅ Type checking passes with both Storybook 9 and 10
  • ✅ Extension works with user projects using either Storybook version

Technical Details

The extension uses requireFrom to dynamically load Storybook packages from the user's project, not from its own dependencies. This means:

  • The devDependency version only affects type checking during development
  • Users can use either Storybook 9 or 10 in their projects
  • No breaking changes for existing users

🤖 Generated with Claude Code

ygkn and others added 2 commits November 1, 2025 15:39
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
…lity

- Change module from "commonjs" to "ESNext"
- Add moduleResolution: "bundler"

This allows TypeScript to resolve Storybook 10's ESM-only internal API types.
The actual build output remains CommonJS via esbuild.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@ygkn ygkn merged commit a8c4867 into main Nov 1, 2025
1 check passed
@ygkn ygkn deleted the storybook10 branch November 1, 2025 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant